function showCalendar(fildId){
	event.cancelBubble=true;
	show(fildId,'365');
}


//显示日期选择对话框
	if (!document.getElementById("CalFrame"))
	 document.write('<iframe id=CalFrame name=CalFrame frameborder=0 src=/PreciseSale/lib/calendar/calendar.htm style=display:none;position:absolute;z-index:100></iframe>');
	document.onclick=hideCalendar;
	
	function show(sFld,days)
	{
	 var cf=document.getElementById("CalFrame");
	 var wcf=window.frames.CalFrame;
	 var fld=document.getElementById(sFld);
	 if(!wcf.bCalLoaded){alert("日历未成功装载！请刷新页面！");return;}
	 if(cf.style.display!="none"){cf.style.display="none";return;}
	 var eT=0,eL=0,p=fld;
	 var sT=document.body.scrollTop,sL=document.body.scrollLeft;
	 var eH=fld.offsetHeight,eW=fld.offsetWidth;
	 while(p&&p.tagName!="BODY"){eT+=p.offsetTop;eL+=p.offsetLeft;p=p.offsetParent;}
	 cf.style.top=(document.body.clientHeight-(eT-sT)-eH>=cf.height)?eT+eH+1:eT-cf.height;
	 cf.style.left=(document.body.clientWidth-(eL-sL)>=cf.width)?eL:eL+eW-cf.width;
	 cf.style.display="block";
	 wcf.fld=fld;
	 wcf.initCalendar(days);
	}
	function hideCalendar()
	{
	 var cf=document.getElementById("CalFrame");
	 cf.style.display="none";
	}

